<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
          function getUserInput() {
            var userInput = document.querySelector('.username').value; 
            var ageInput = document.querySelector('.age').value;
            var emailInput = document.querySelector('.email').value;
            var addressInput = document.querySelector('.address').value;
            var salaryInput = document.querySelector('.salary').value;
            alert("姓名：" + userInput + "\n" + "年龄：" + ageInput + "\n" + "邮箱：" + emailInput + "\n" + "家庭住址：" + addressInput + "\n" + "工资：" + salaryInput);
        }
    </script>
    姓名： <input type="text" class="username"><br>
    年龄： <input type="text" class="age"><br>
    邮箱： <input type="text" class="email"><br>
    家庭住址： <input type="text" class="address"><br>
    工资： <input type="text" class="salary"><br>
    <button onclick="getUserInput()">保存</button><br>
</body>
</html>